<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<div class="container-fluid">
	<div class="tabbable" id="tabs-598782">
		<ul class="nav nav-tabs">
			<li class="active" id="institution" style="border-bottom: 1px solid #ddd;"><a href="" data-toggle="tab" id="institution">个人服务商认证</a></li>
			<!-- < li id="charitarian"><a href="" data-toggle="tab" id="charitarian">投资人认证</a></li>  -->
		</ul>
		<!-- 用户列表容器 -->
		<div class="tab-pane active"  id="verifyList">
			<div id="list"></div>
			<div id="pic-view" ><img alt="" src=""></div>
		</div>
	</div>
</div>

<!-- 机构 -->
<script type="text/html" id="verifyOrgList-template">
<table class="table table-striped table-hover table-bordered" >
	<thead>
		<tr>
			<th width="2%">id</th>
			<th width="15%"> 公司名</th>
			<th class="center" width="7%">其他信息</th>
			<th width="9%">申请人</th>
			<th width="5%">职务</th>
			<th width="10%">申请人电话</th>
			<th class="center" width="10%">认证资料</th>
			<th class="center" width="10%">授权书</th>
			<th width="20%">用户信息</th>
			<th width="5%">
				<select id="jg-status" name="institution.id" class="status">
					<option  >状态</option>
					<option value="0" >所有</option>
					<option value="1" >审核中</option>
					<option value="2">通过</option>
					<option value="3">拒绝</option>
				</select>
			</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody >
		<$if(result!=null)for(var i = 0;i<result.length;i++){$>
		<tr>
			<td>
				<$=result[i].id$>
			</td>
			<td>
				<$=result[i].name$>
			</td>
			<td class="center">
				 <a id="modal-337957" href="#modal-container-<$=result[i].id$>" role="button" class="btn btn-warning" style="color:#000" data-toggle="modal">查看</a>
			</td>
			<td>
				<$=result[i].applicantName$>
			</td>
			<td>
				<$=result[i].applicantPost$>
			</td>
			<td>
				<$=result[i].applicantTelephone$>
			</td>
			<td class="center">
				<a href="<$=result[i].verifyDocUrl_1$>" class="btn btn-warning download" target="_blank" style="color:#000">下载1</a>
				<a href="<$=result[i].verifyDocUrl_2$>" class="btn btn-warning download" target="_blank" style="color:#000">下载2</a>
			</td>
			<td class="center">
				<a href="<$=result[i].verifyAuthUrl$>" class="btn btn-warning download"  style="color:#000" target="_blank">下载</a>
			</td>
			<td class="center">
				<a href="${ctx}/home?id=<$=result[i].user.id$>" class="btn btn-warning" style="color:#000" target="view_window">查看</a>
				<a href="<$=result[i].verifyIdCard1Url$>" class="btn btn-warning download" style="color:#000" target="_blank">证件1</a>
				<a href="<$=result[i].verifyIdCard2Url$>" class="btn btn-warning download" style="color:#000" target="_blank">证件2</a>
			</td>

			<td class="status">
				<$
					switch(result[i].status){
					case 1: 
					print("审核中");
					break;	
					case 2:
					print("通过");	
					break;
					case 3:
					print("拒绝");
					break;
					default:
					print("获取状态失败");
				}$>
			</td>
			<td>
				<div class="btn-group">
					<a href="${ctx}/${admin_url}/institution/update?id=<$=result[i].user.id$>" class="btn btn-warning"><i class="icon-edit"></i></a>
					<a href="${ctx}/${admin_url}/sendmessage?uid=<$=result[i].user.id$>" class="btn btn-warning"><i class="icon-envelope" data=<$=result[i].user.id$>></i> </a>
				</div>
			</td>
		</tr>
		<div id="modal-container-<$=result[i].id$>" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-header" style="height:40px;">
						 <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="position:relative;top:10px;">×</button>
						<h3 id="myModalLabel" style="position:relative;top:5px;width:200px;">
							个人服务商简介
						</h3>
					</div>
					<div class="modal-body">
						<input id="provinceId" value="<$=result[i].provinceId$>" type="hidden">
						<input id="cityId" value="<$=result[i].cityId$>" type="hidden">
						<input id="districtId" value="<$=result[i].districtId$>" type="hidden">
						<p>
							描述：<$=result[i].description$>
						</p>
						
						<p>
							邮箱：<$=result[i].applicantEmail$>
						</p>
						<p>
							联系电话：<$=result[i].applicantPhone$>
						</p>
						<p>
							身份证号：<$=result[i].identityCode$>
						</p>
						<p>
							详细地址：<$=result[i].address$>
						</p>
					</div>
					<div class="modal-footer">
						 <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true" style="color:#000">关闭</button>
					</div>
				</div>
	<$}$>
	</tbody>
</table>
<$ if ( totalPages > 1 ) { $>
	<div class="pagination">
		<$==pagination$>
	</div>
<$ } $>

</script>
<!-- 投资人 -->
<script type="text/html" id="verifyFameList-template">
<table class="table table-striped table-hover table-bordered" >
	<thead>
		<tr>
			<th>id</th>
			<th>昵称</th>
			<th>真实姓名</th>
			<th>籍贯</th>
			<th class="center">联系电话</th>
			<th>邮箱</th>
			<th>新浪微薄</th>
			<th>腾讯微薄</th>
			<th>
				<select id="zrj-status" class="status">
					<option  >状态</option>
					<option value="0" >所有</option>
					<option value="1" >审核中</option>
					<option value="2">通过</option>
				</select>
			</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody >
		<$if(result!=null)for(var i = 0;i<result.length;i++){$>
		<tr>
			<td>
				<$=result[i].user.id$>
			</td>
			<td>
				<$=result[i].nickName$>
			</td>
			<td>
				<$=result[i].realName$>
			</td>
			<td>
				<$=result[i].hometown$>
			</td>
			<td>
				<$=result[i].phone$>
			</td>
			<td>
				<$=result[i].email$>
			</td>
			<td>
				<$=result[i].sinaWeibo$>
			</td>
			<td>
				<$=result[i].tencentWeibo$>
			</td>
			<td class="status">
				<$
					switch(result[i].status)
					{  
					case 1: 
					print("审核中");
					break;
					case 2:
					print("通过");
					break;
					default:
					print("获取状态失败");
					}$>
			</td>
			<td>
				<div class="btn-group">
					<a href="${ctx}/${admin_url}/charitarian/update?id=<$=result[i].id$>" class="btn btn-warning" style="color:#000"><i class="icon-edit"></i></a>
					<a href="${ctx}/${admin_url}/sendmessage?uid=<$=result[i].user.id$>" class="btn btn-warning" style="color:#000"><i class="icon-envelope" data=<$=result[i].user.id$>></i> </a>
				</div>
			</td>
		</tr>
	<$}$>
	</tbody>
</table>
<$ if ( totalPages > 1 ) { $>
	<div class="pagination">
		<$==pagination$>
	</div>
<$ } $>

</script>
<c:if test="${env == 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js-dist/admin/verify-user-page");
	</script>
</c:if>
<c:if test="${env != 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js/admin/verify-user-page");
	</script>
</c:if>